<?php

function createWorks($req2) {
    echo '
        <span class="template_title">Creer une nouvelle oeuvre</span>
        <span class="template_box_admin">
         <form action="' . URL_ROOT . 'create-work/form-1" method="post"  enctype="multipart/form-data">
            <p>
                <span class="template_span">Nom: <input class="template_input" type="text" name="name" /></span>
                <span class="template_span">Description: <textarea class="template_input_text" type="text" name="description" id = "visu"></textarea></span>
                <span class="template_span">Premiere photo de l\'oeuvre: <input  class="template_input" type="file" name="photo" />( extensions autoris&eacute;es: .jpg, .png, .jpeg )</span> 
                <span class="template_span">Deuxieme photo de l\'oeuvre: <input  class="template_input" type="file" name="photob" /> ( extensions autoris&eacute;es: .jpg, .png, .jpeg )</span> 

<span class="template_span">Auteur de l\'article: <select multiple name="autor">

               ';
    while ($donnees = $req2->fetch(PDO::FETCH_ASSOC)) {
        $name_autor = $donnees['user_name'];
        echo'  <OPTION> ' . $name_autor . '';
    }
    echo' </select></span> 
          <span class="template_span">Region de l\'oeuvre:    <select multiple name="region"></span>
               ';
    $i = 0;
    while ($i < 20) {
        
        $region = regions($i);
        echo'  <OPTION> ' . $region . '';
        $i++;
    }
    echo '</select>';
    echo'   <input class="button" type="submit" value="Valider" />
            </p>
         </form></span>';
}

function viewCreated() {
    echo '<div>
            Votre oeuvre est ajoute
          </div>
          ';
}

?>
